//
//  YXPlayerViewController.swift
//  swift_wobo
//
//  Created by yuxin on 2018/12/1.
//  Copyright © 2018 wuxiantianli. All rights reserved.
//

import UIKit
import SnapKit

class YXPlayerViewController: UIViewController {

   
    
    let playerView = YXPlayerView()
    
    override func viewDidLoad() {
        super.viewDidLoad()

         navigationItem.leftBarButtonItem = UIBarButtonItem(title: "退出", style: .plain, target: self, action: #selector(leftBarButtonClick))
        view.backgroundColor = UIColor.white
        
        
        configurePlayer()
    }


    func configurePlayer() {
      
        view.addSubview(playerView)
        playerView.snp.makeConstraints { (make) in
            make.size.equalTo(CGSize.init(width: YXConfigure.screenWidth, height: YXConfigure.playerHeight))
            make.center.equalToSuperview()
        }
        
    }
    
    @objc func leftBarButtonClick() {
        dismiss(animated: true, completion: nil)
    }
}
